package com.wl.day74.biz;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.wl.day74.dao.BookTypeDAO;
import com.wl.day74.model.BookType;

@Service("bookTypeBiz")
@Scope("prototype")
public class BookTypeBiz {
	@Resource
	private BookTypeDAO bookTypeDAO;

	public void setBookTypeDAO(BookTypeDAO bookTypeDAO) {
		this.bookTypeDAO = bookTypeDAO;
	}
	
	public List<BookType> findAll(){
		return bookTypeDAO.findAll();
	}
	
	public void save(BookType bookType){
		bookTypeDAO.insert(bookType);
	}
}
